﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class FileDownloader : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();
        Response.ClearContent();
        Response.ClearHeaders();
        Context.Response.Headers.Add("content-type", "application/text");
        Context.Response.Headers.Add("content-disposition", "attachment;filename=emre.txt");
        byte[] buffer = System.Text.Encoding.ASCII.GetBytes("Merhaba ..  ");
        Context.Response.OutputStream.Write(buffer, 0, buffer.Length);
    }
}